package com.graduationdesign.zengyan.graduationdesignapp.utils;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by ZengYan on 2018/4/21.
 *
 * @desc :
 */
public class ToastUtils {


    public static void showDefaultError(Context context, Throwable throwable) {
        Toast.makeText(context, "Default:"+throwable.getMessage(), Toast.LENGTH_SHORT).show();
    }

    public static void showServerError(Context context, Throwable throwable) {
        Toast.makeText(context, "Server:"+throwable.getMessage(), Toast.LENGTH_SHORT).show();
    }

    public static void showNetError(Context context, Throwable throwable) {
        Toast.makeText(context, "Net:"+throwable.getMessage(), Toast.LENGTH_SHORT).show();
    }

    public static void showToast(Context context, String message) {
        Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
    }




}
